package com.donggei.exp_mybatis.serviceImpl;

import com.donggei.exp_mybatis.mapper.IUserDao;
import com.donggei.exp_mybatis.pojo.User;
import com.donggei.exp_mybatis.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private IUserDao userdao;

    @Override
    public User getUser(Integer id) {

        return userdao.getUser(id);
    }

    @Override
    public List<User> findAllUser() {

        return userdao.findAllUser();
    }

    @Override
    public List<User> findUsers(String userName, String note) {

        return userdao.findUsers(userName, note);
    }

    @Override
    public Integer insertUser(User user) {

        return userdao.insertUser(user);

    }

    @Override
    public Integer deleteUser(Integer id) {

        return userdao.deleteUser(id);
    }

    @Override
    public Integer updateUser(User user) {
        return userdao.updateUser(user);
    }


}